import React from 'react';
import Header from 'Component/Header';
import './index.scss';

// const $ = require('jquery');

class PageContainer extends React.Component {
  componentDidMount() {
    window.onresize = (() => {
      this.changeWidth();
    });
    this.changeWidth();
  }
  componentDidUpdate() {
    this.changeWidth();
  }
  changeWidth() {
    /*const clientHeight = parseInt(window.innerHeight, 10);
    const headerHeight = parseInt($('.header-wrapper').css('height'), 10);
    const minHeight = clientHeight - headerHeight;
    $('.content-container').css('min-height', `${minHeight}px`);
    $('.dispatch-container').css('min-height', `${minHeight - 50}px`);
    const sideHeight = minHeight - 40;
    $('.side-wrap-project').css('min-height', `${sideHeight}px`);
    $('.side-menu').css('min-height', `${sideHeight - 20}px`);*/
  }
  render() {
    return (
      <div className="page-container">
        <Header />
        <div className="content-container">
          { this.props.children }
        </div>
      </div>
    );
  }
}

export default PageContainer;
